<html>
<head><meta charset="utf-8"><title>optional namespacing · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html">optional namespacing</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="209836109"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/209836109" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#209836109">(Sep 11 2020 at 21:15)</a>:</h4>
<p>So I've discussed this with many of y'all in the past, but given the recent spate of namespacing discussions I decided to write this down as a proposal. What do y'all think of <a href="https://hackmd.io/SqSAQ0teRe-yv92i1tWHcg">https://hackmd.io/SqSAQ0teRe-yv92i1tWHcg</a> ? </p>
<p>cc <span class="user-mention" data-user-id="239881">@Josh Triplett</span>   especially who has been active in some of the recent discussions</p>



<a name="209836396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/209836396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#209836396">(Sep 11 2020 at 21:19)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="209836412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/209836412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#209836412">(Sep 11 2020 at 21:19)</a>:</h4>
<p>I like that proposal, and I'd be thrilled to support it exactly as you pitched it.</p>



<a name="209836459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/209836459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#209836459">(Sep 11 2020 at 21:19)</a>:</h4>
<p>One detail I'd want to see written down: a definition for how <code>foo/bar</code> appears in the <a href="http://crates.io">crates.io</a> index repo.</p>



<a name="209836549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/209836549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#209836549">(Sep 11 2020 at 21:20)</a>:</h4>
<p>Would you consider adding that? (Needs to be unambiguous, such that it won't conflict with any other crate name.)</p>



<a name="209838021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/209838021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#209838021">(Sep 11 2020 at 21:35)</a>:</h4>
<p>And and index format that is not misinterpreted by old cargos like <a href="https://nvd.nist.gov/vuln/detail/CVE-2019-16760">https://nvd.nist.gov/vuln/detail/CVE-2019-16760</a></p>



<a name="209838205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/209838205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#209838205">(Sep 11 2020 at 21:37)</a>:</h4>
<p>I do not personally care about the "namespace" fite. But would not object to that proposal, if those that do care liked it.</p>



<a name="209838323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/209838323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#209838323">(Sep 11 2020 at 21:38)</a>:</h4>
<p>And you are brave indeed to wade into that fite.</p>



<a name="209838594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/209838594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#209838594">(Sep 11 2020 at 21:41)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> good point, will do</p>



<a name="209838659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/209838659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#209838659">(Sep 11 2020 at 21:41)</a>:</h4>
<p>Hopefully there's a "not allowed in package names" character you can use in a filename.</p>



<a name="209838761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/209838761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#209838761">(Sep 11 2020 at 21:42)</a>:</h4>
<p>For instance, <code>@</code>. foo/bar could be <code>3/f/foo/@/bar</code>.</p>



<a name="209838831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/209838831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#209838831">(Sep 11 2020 at 21:43)</a>:</h4>
<p>And <code>foof/blargh</code> would be <code>fo/of/@/blargh</code>.</p>



<a name="209845166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/209845166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#209845166">(Sep 11 2020 at 23:02)</a>:</h4>
<p>Er, correction, that should be <code>3/f/foo@/bar</code> and <code>fo/of/foof@/blargh</code>.</p>



<a name="209845223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/209845223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#209845223">(Sep 11 2020 at 23:03)</a>:</h4>
<p><span class="user-mention" data-user-id="132040">@Manish Goregaokar</span> Rather than saying "one of the following schemes" and giving possibilities, could you pick one, and mention alternatives in the alternatives section? That should reduce bikeshedding. Personally, I'd prefer <code>path/to/cratename@/subcratename</code>.</p>



<a name="209845269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/209845269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#209845269">(Sep 11 2020 at 23:04)</a>:</h4>
<p>Good call</p>



<a name="209853508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/209853508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tony Arcieri <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#209853508">(Sep 12 2020 at 01:54)</a>:</h4>
<p>separate from whatever character becomes the delimiter in the package name, I think it'd be cool if you could do the nested TOML syntax I described in this post: <a href="https://internals.rust-lang.org/t/pre-rfc-hyper-minimalist-namespaces-on-crates-io/13041/19?u=bascule">https://internals.rust-lang.org/t/pre-rfc-hyper-minimalist-namespaces-on-crates-io/13041/19?u=bascule</a></p>



<a name="210042433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/210042433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#210042433">(Sep 14 2020 at 18:10)</a>:</h4>
<p><a href="https://internals.rust-lang.org/t/pre-rfc-packages-as-optional-namespaces/13059">https://internals.rust-lang.org/t/pre-rfc-packages-as-optional-namespaces/13059</a></p>



<a name="210042545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/210042545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#210042545">(Sep 14 2020 at 18:10)</a>:</h4>
<p><span class="user-mention" data-user-id="132040">@Manish Goregaokar</span>  not sure if you saw my note on hackmd, but <code>foo/bar</code> is not a valid TOML key.</p>



<a name="210042589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/210042589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#210042589">(Sep 14 2020 at 18:11)</a>:</h4>
<p><span class="user-mention" data-user-id="120518">@Eric Huss</span> huh, it seemed to be when i checked it</p>



<a name="210042599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/210042599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#210042599">(Sep 14 2020 at 18:11)</a>:</h4>
<p><code>"foo/bar"</code> will be either way, yes?</p>



<a name="210042611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/210042611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#210042611">(Sep 14 2020 at 18:11)</a>:</h4>
<p>well, it has to be quoted as a string.</p>



<a name="210042641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/210042641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#210042641">(Sep 14 2020 at 18:11)</a>:</h4>
<p>ah</p>



<a name="210042735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/210042735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#210042735">(Sep 14 2020 at 18:12)</a>:</h4>
<p>unquoted keys are limited to <code>A-Z / a-z / 0-9 / - / _</code></p>



<a name="210042807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/210042807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#210042807">(Sep 14 2020 at 18:13)</a>:</h4>
<p>ah. updated. i tested against a toml parser but i guess it was more permissive</p>



<a name="210048957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/210048957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#210048957">(Sep 14 2020 at 19:04)</a>:</h4>
<p>I think that's fine; writing <code>"crate/subcrate"</code> doesn't seem unreasonable.</p>



<a name="213614687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/213614687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#213614687">(Oct 16 2020 at 21:11)</a>:</h4>
<p>By the way, I've opened an RFC repo with some issues filed <a href="https://github.com/Manishearth/namespacing-rfc">here</a>. The crates team is planning on discussing it a bit before announcing it, but y'all are more than welcome to participate cc <span class="user-mention" data-user-id="239881">@Josh Triplett</span>  <span class="user-mention" data-user-id="256759">@boats</span></p>



<a name="214806553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/optional%20namespacing/near/214806553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/optional.20namespacing.html#214806553">(Oct 28 2020 at 08:26)</a>:</h4>
<p>Thanks for doing this. I have proposed some alternatives.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>